<extend name="Index/index" />
<block name="nav">
    <div class="breadcrumbs" id="breadcrumbs">
        <script type="text/javascript">
            try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
        </script>

        <ul class="breadcrumb">
            <li>
                <i class="icon-home home-icon"></i>
                <a href="<{:U(Index/index)}>">首页</a>
            </li>
            <li class="active">后台用户</li>
        </ul><!-- .breadcrumb -->

        <div class="nav-search" id="nav-search">
            <form class="form-search" action="<{:U(AdminUser/index)}>" method="post">
                <span class="input-icon">
                    <input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" name="name" />
                    <i class="icon-search nav-search-icon"></i>
                </span>
                <button class="btn-sm btn-primary">搜索</button>
            </form>
        </div><!-- #nav-search -->
    </div>
</block>
<block name="nav1">
    <div class="page-content">
        <div class="page-header">
            <h1>
                后台用户管理
                <small>
                    <i class="icon-double-angle-right"></i>
                     查看
                </small>
            </h1>
        </div><!-- /.page-header -->
    </div>
</block>
<block name="admin">

    <div class="pull-left col-md-12">
        <h1 class="text-center"><{$title}></h1>
        <a href="<{:U('AdminUser/add')}>" class="btn-lg btn-info">添加</a>
        <hr>
        <table class="table h4 mt50" id="table">
            <tr class="blue">
                <th>id</th>
                <th>姓名</th>
                <th>电话</th>
                <th>角色</th>
                <th>操作</th>
            </tr>
            <volist name="list" id="v">
            <tr>
                <td><{$v['id']}></td>
                <td><{$v['name']}></td>
                <td><{$v['phone']}></td>
                <td class="col-md-3">
                    <?php
                        foreach ($v['actor'] as $key => $value) {
                            echo $value['aname'].', ';
                        }
                    ?>
                </td>
                <td>
                    <a href="<{:U('AdminUser/edit',array('id'=>$v['id']))}>" class="btn-lg btn-primary">编辑</a>
                    <a href="<{:U('AdminUser/del',array('id'=>$v['id']))}>" class="btn-lg btn-danger">删除</a>
                    <a href="<{:U('Actor/alloActor',array('id'=>$v['id'], 'name'=>$v['name']))}>" class="btn-lg btn-success">分配角色</a>
                </td>
            </tr>
            </volist>
            <tr><td colspan="5">共<{$count}>条记录,当前<{$p}>页</td></tr>
        </table>
        <!-- 分页 -->
        <div class="text-center">
            <{$page}>
        </div>
    </div>

</block>
